<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 
<%@ taglib uri="/resource/UserPwoer.tld" prefix="p"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	pageContext.setAttribute("fnId", request.getAttribute("fnId"));
	pageContext.setAttribute("userPwoer", request.getSession().getAttribute("userPwoer"));
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>
<link href="${path }/resource/css/common.css" rel="stylesheet" type="text/css" />
<style>

body{
background: radial-gradient(ellipse at 50% 50%,#00a38d 0,#1e5899 100%,#efefef);}

</style>
</head>
<body class="gray-bg">
 	<div class="warp"></div>
 	<div class="top-title">
			客户反馈系统
	</div>
	<div class=" m-mt60">
		<div class="container ">
			
			
			<h2 class=" text-center color-w">欢迎使用客户反馈系统</h2>
			<a href="${path }/feedback/client/loginOut" class="color-w m-fr m-goBack">安全退出</a>				
		</div>
		<div class="container boxs color-w ">
		
		<!-- 选择的项目id -->
		<input type="hidden" id="projId" > 
		
		<!-- <div class="row nav-pro" style="padding-left: 85%" >
			<div class="col-xs-12 center ">
				<div class="pro" id="tuichu" >
					<h3 class="title">退出</h3>								
				</div>
			</div>			
		</div> -->
		
		<div class="row nav-pro">
			<c:choose>
				<c:when test="${!empty projList }">
					<c:forEach items="${projList }" var="item" varStatus="status">
						<div class="col-xs-4 center ">
							<div class="pro proClick" projId="${item.id }">
								<h2 class="title">${item.projName }</h2>
								<div>创建时间 : <fmt:formatDate value="${item.createTime }" pattern="yyyy年MM月dd日" /></div>
								<div>预计结束时间 : <fmt:formatDate value="${item.endTime }" pattern="yyyy年MM月dd日" /></div>
								<div>实际结束时间 : <fmt:formatDate value="${item.actEndTime }" pattern="yyyy年MM月dd日" /></div>
								<div>访问地址 : ${item.url }</div>
								<div>项目介绍 : ${item.introduction }</div>				
							</div>
						</div>
					</c:forEach>				
				</c:when>
				<c:otherwise>
					<div class="col-xs-12 center ">
						<div class="pro">							
							<h3 class="title">暂无项目信息</h3>		
						</div>
					</div>				
				</c:otherwise>			
			</c:choose>		
		</div>
		
		<div class="row nav-fcn color-w">
			<div class="col-xs-4 center right">
				<div class="box" onclick="openFeedbackList()">
					<div class="msg left ">在此您可以提交任何与项目有关的建议,我们工程师会及时查看并与您反馈</div>
					<img alt="" src="${path }/resource/images/tjjy.png">
					<h3 class="title">提交建议</h3>				
				</div>
			</div>
			
			<div class="col-xs-4 center">
				<div class="box" onclick="openLook()">
					<div class="msg left">在此您可以查看项目的详细信息以及开发的进度</div>
					<img alt="" src="${path }/resource/images/xmzt.png">
					<h3 class="title">查看项目</h3>					
				</div>
			</div>
			
			<div class="col-xs-4 center">
				<div class="box go-back">
					<div class="msg left">仅仅是重新选择项目而已</div>
					<img alt="" src="${path }/resource/images/goback2.png">
					<h3 class="title">返回上级</h3>
					
				</div>
			
			</div>
			
																																
		</div>
		
	</div> 	
</div>
	
	<script type="text/javascript">
	/*动态调整容器高度  */
	$(function(){
		
		var d_height=$(document).height()-36;
		$(".ibox-content").height(d_height);
		
	})
 	 $(function(){
		if($.query.get('title')==1){
			$(".nav-fcn").animate({			   
			    opacity:'1',	
			    left:'0'
			  });
			 $()
			  $(".nav-pro").animate({
				 opacity:'0',
				 right:'100%'
			  });	
			//项目选址
			var projId = $.query.get("projId");
			$("#projId").val(projId);
			console.log("项目选址"+projId);
		}		
	}) 
	/* 返回上级 */
	$(function(){
		$(".go-back").click(function(){
			$(".nav-fcn").animate({			   
			    opacity:'0',	
			    left:'100%'
			  },1000);
			 $(".nav-pro").animate({
				 opacity:'1',
				 right:'0'
			  },1000);
			  
			}); 
			
	})
	/*项目选择ui*/
	$(function(){
		//点击事件
		$(".proClick").click(function(){
			//动画
			$(".nav-fcn").animate({			   
			    opacity:'1',	
			    left:'0'
			  },1000);
			  $(".nav-pro").animate({
				 opacity:'0',
				 right:'100%'
			  },1000);
			  
			  var projId = $(this).attr("projId")
			  $("#projId").val(projId);
			  console.log("项目选择"+projId);
		}); 
			
	})
		/*功能切换ui  */
	$(function(){
		$(".box").mouseenter(function(){
			$(this).children(".msg").slideToggle();
			$(this).children(".title").slideToggle() ;
		})	
		$(".box").mouseleave(function(){
			
			$(this).children(".msg").slideToggle();
			$(this).children(".title").slideToggle() ;
		})	
			
	});
 	
	

		//打开查看界面		
		function openLook() {
			var projId = $("#projId").val();
			MTools.redirect("${path}/feedback/clientchanges/all?id=" + projId);
		}
		
		
		//打开问题反馈列表界面		
		function openFeedbackList() {
			var projId = $("#projId").val();
			MTools.redirect("${path}/feedback/clientchanges/showFeedBackList?projId=" + projId); 
		}
		
		
	</script>
</body>
</html>
